package com.winit.requirement.service;

import com.winit.common.base.bean.ExecuteResult;
import com.winit.requirement.model.BrdRequirement;
import com.winit.requirement.model.ReqHistory;

import java.util.List;

public interface IBrdRequirementService {
    int deleteBrdRequirementsByBrdId(String brdId);

    ExecuteResult checkCanBrdRequirementDeleteForBrd(String brdId);

    List<BrdRequirement> searchBrdRequirementsByReqIds(List<String> reqIds);

    BrdRequirement getBrdRequirementByReqId(String reqId);

    /**
     * 刷新projectPlan与brd_requirement的关系
     * @param projectPlanId
     * @param reqIds
     * @param operationMode  1-projectPlan新增， 2-projectPlan删除， 3-projectPlan修改
     */
    void flushBrdRequirementsOfProjectPlan(String projectPlanId, List<String> reqIds, int operationMode);

    void updateBrdById(BrdRequirement req);

    void updateProjectPlanIdAndBrdStatusByProjectPlanId(String reqId, String status, String projectPlanId);


    ReqHistory getLatestSubmitHistory(String reqId);
}
